import request from '@/utils/request'

export function getCategoryList(params) {
  return request({
    url: '/cloudcut-api/products/category-list',
    method: 'get',
    params
  })
}
export function getList(params) {
  return request({
    url: '/cloudcut-api/products/list',
    method: 'get',
    params
  })
}

export function addCategory(data) {
  return request({
    url: '/cloudcut-api/products/category-add',
    method: 'post',
    data
  })
}
export function updateCategory(data) {
  return request({
    url: '/cloudcut-api/products/category-edit',
    method: 'post',
    data
  })
}
export function updateName(data) {
  return request({
    url: '/cloudcut-api/products/products-edit-name',
    method: 'post',
    data
  })
}
export function cutVideo(data) {
  return request({
    url: '/cloudcut-api/products/products-edit-cut',
    method: 'put',
    data,
    params: data
  })
}
export function delCategory(params) {
  return request({
    url: '/cloudcut-api/products/category-delete',
    method: 'delete',
    params
  })
}
export function delItem(params) {
  return request({
    url: '/cloudcut-api/products/products-delete',
    method: 'delete',
    params
  })
}
export function batchDel(params) {
  return request({
    url: '/cloudcut-api/products/products-deleteBatch',
    method: 'delete',
    params
  })
}
